import requests
url = 'https://www.baidu.com/'
response = requests.get(url)
result = response.content.decode()
print(response.headers)
# print(response.text)
# print(response,type(response))
# print(response.content,type(response.content))
# print(result,type(result))
